@import './index.less';

body {
  //select setting
  // .ant-select-selection--multiple .ant-select-selection__rendered {
  //   overflow: hidden;
  // }
  // .ant-select-selection--multiple .ant-select-selection__rendered ul {
  //   display: flex;
  //   flex-wrap: nowrap;
  //   overflow: hidden;
  //   float: left;
  // }
  // .ant-select-selection--multiple .ant-select-selection__choice {
  //   float: none;
  //   overflow: visible;
  // }
  // .ant-select-selection--multiple .ant-select-search--inline {
  //   float: none;
  //   position: absolute;
  // }
  // .ant-select-selection--multiple {
  //   max-height: 32px;
  //   overflow: hidden;
  // }
  .ant-tooltip-arrow {
    // background-color: #FFFFFF;
    border-left-color: rgba(255, 255, 255, 0);
    border-right-color: rgba(255, 255, 255, 0);
    border-bottom-color: rgba(255, 255, 255, 0);
    border-top-color: rgba(255, 255, 255, 0);
  }
  .ant-tooltip-arrow::before {
    background-color: rgba(255, 255, 255, 0.75);
  }
  .ant-tooltip-inner {
    font-size: 12px;
    color: #666666;
    background-color: #FFFFFF;
    border-radius: 5px;
    padding: 8px 8px !important;
  }

  .ant-tooltip-placement-bottom .ant-tooltip-arrow, .ant-tooltip-placement-bottomLeft .ant-tooltip-arrow, .ant-tooltip-placement-bottomRight .ant-tooltip-arrow {
    border-bottom-color: rgba(255, 255, 255, 1);
  }
  .ant-tooltip-placement-right .ant-tooltip-arrow, .ant-tooltip-placement-rightTop .ant-tooltip-arrow, .ant-tooltip-placement-rightBottom .ant-tooltip-arrow {
    border-right-color: rgba(255, 255, 255, 1);
  }
  .ant-tooltip-placement-top .ant-tooltip-arrow, .ant-tooltip-placement-topLeft .ant-tooltip-arrow, .ant-tooltip-placement-topRight .ant-tooltip-arrow {
    border-top-color:  rgba(255, 255, 255, 1);
  }
  .ant-tooltip-placement-left .ant-tooltip-arrow, .ant-tooltip-placement-leftTop .ant-tooltip-arrow, .ant-tooltip-placement-leftBottom .ant-tooltip-arrow {
    border-left-color:  rgba(255, 255, 255, 1);
  }
  &.colorWeak {
    filter: invert(80%);
  }
  &.userLayout {
    overflow: auto;
  }
}

.layout.ant-layout {
  height: auto;
  overflow-x: hidden;

  &.mobile,
  &.tablet {
    .ant-layout-content {
      margin: 16px 0 0;
      .content {
        margin: 16px 0 0;
      }
    }

    /**
     * ant-table-wrapper
     * 覆盖的表格手机模式样式，如果想修改在手机上表格最低宽度，可以在这里改动
     */
    .ant-table-wrapper {
      .ant-table-content {
        overflow-y: auto;
      }
      .ant-table-body {
        min-width: 800px;
      }
    }
    .topmenu {
      /* 必须为 topmenu  才能启用流式布局 */
      &.content-width-Fluid {
        .header-index-wide {
          margin-left: 0;
        }
      }
    }
  }

  &.mobile {
    .sidemenu {
      .ant-header-fixedHeader {
        &.ant-header-side-opened,
        &.ant-header-side-closed {
          width: 100%;
        }
      }
    }
  }

  &.ant-layout-has-sider {
    flex-direction: row;
  }

  .trigger {
    font-size: 20px;
    line-height: 64px;
    padding: 0 24px;
    cursor: pointer;
    transition: color 0.3s;
    &:hover {
      background: rgba(0, 0, 0, 0.025);
    }
  }

  .topmenu {
    .ant-header-fixedHeader {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: 100%;
      }

      &.ant-header-side-closed {
        width: 100%;
      }
    }
    /* 必须为 topmenu  才能启用流式布局 */
    &.content-width-Fluid {
      .header-index-wide {
        max-width: unset;
        .header-index-left {
          flex: 1 1 1000px;
          .logo{
            margin-left: 25px;
          }
          .ant-menu.ant-menu-horizontal{
            max-width: calc(100vw - 190px - 238px - 25px);
            flex: 1 1 calc(100vw - 190px - 238px - 25px);
          }
        }
        .header-index-right{
          margin-right:25px;
        }
      }

      .page-header-index-wide {
        max-width: unset;
      }
    }
  }

  .sidemenu {
    .ant-header-fixedHeader {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: calc(100% - 256px);
      }

      &.ant-header-side-closed {
        width: calc(100% - 80px);
      }
    }
  }

  .header {
    height: 64px;
    padding: 0 12px 0 0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
  }

  .header,
  .top-nav-header-index {
    .user-wrapper {
      float: right;
      height: 100%;

      .action {
        cursor: pointer;
        // padding: 0 12px;
        display: inline-block;
        transition: all 0.3s;
        height: 100%;
        color: rgba(0, 0, 0, 0.65);

        &:hover {
          background: rgba(0, 0, 0, 0.025);
        }

        .avatar {
          // margin: 20px 8px 20px 0;
          color: #1890ff;
          background: hsla(0, 0%, 100%, 0.85);
          vertical-align: middle;
        }

        .icon {
          font-size: 16px;
          padding: 4px;
        }
      }
    }

    &.dark {
      .user-wrapper {
        .action {
          color: rgba(255, 255, 255, 0.85);
          a {
            color: rgba(255, 255, 255, 0.85);
          }

          &:hover {
            background: rgba(255, 255, 255, 0.16);
          }
        }
      }
    }
  }

  &.mobile,
  &.tablet {
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .trigger {
            color: rgba(255, 255, 255, 0.85);
            padding: 0 12px;
          }

          .logo.top-nav-header {
            flex: 0 0 56px;
            text-align: center;
            line-height: 58px;
            h1 {
              display: none;
            }
          }
        }
      }

      &.light {
        .header-index-wide {
          .header-index-left {
            .trigger {
              color: rgba(0, 0, 0, 0.65);
            }
          }
        }
        //
      }
    }
  }

  &.tablet {
    // overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .logo > a {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
        .ant-menu.ant-menu-horizontal {
          flex: 1 1 auto;
          white-space: normal;
        }
      }
    }
  }

  .top-nav-header-index {
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
    transition: background 0.3s, width 0.2s;

    .header-index-wide {
      max-width: 1200px;
      margin: auto;
      padding-left: 0;
      display: flex;
      height: 64px;

      .ant-menu.ant-menu-horizontal {
        max-width: 835px;
        flex: 0 1 835px;
        border: none;
        height: 64px;
        line-height: 64px;
      }

      .header-index-left {
        flex: 0 1 1000px;
        display: flex;

        .logo.top-nav-header {
          flex: 0 0 165px;
          width: 165px;
          height: 64px;
          position: relative;
          line-height: 64px;
          transition: all 0.3s;
          overflow: hidden;

          img,
          svg {
            display: inline-block;
            vertical-align: middle;
            height: 32px;
            width: 32px;
          }

          h1 {
            color: #fff;
            display: inline-block;
            vertical-align: top;
            font-size: 16px;
            margin: 0 0 0 12px;
            font-weight: 400;
          }
        }
      }

      .header-index-right {
        flex: 0 0 238px;
        align-self: flex-end;
        height: 64px;
        overflow: hidden;

        .content-box {
          float: right;
          .action {
            max-width: 140px;
            overflow: hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
          }
        }
      }
    }

    &.light {
      background-color: #fff;

      .header-index-wide {
        .header-index-left {
          .logo {
            h1 {
              //color: #002140;
              color: #ffffff;
            }
          }
        }
      }
    }
  }

  // 内容区
  .layout-content {
    margin: 16px 16px 0px;
    height: 100%;
    height: 64px;
    padding: 0 12px 0 0;
  }

  // footer
  .ant-layout-footer {
    padding: 0;
  }
}

.topmenu {
  .page-header-index-wide {
    max-width: 1200px;
    margin: 0 auto;
  }
}

// drawer-sider 自定义
.ant-drawer.drawer-sider {
  .sider {
    box-shadow: none;
  }

  &.dark {
    .ant-drawer-content {
      background-color: rgb(0, 21, 41);
    }
  }
  &.light {
    box-shadow: none;
    .ant-drawer-content {
      background-color: #fff;
    }
  }

  .ant-drawer-body {
    padding: 0;
  }
}

// 菜单样式
.sider {
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  position: relative;
  z-index: @ant-global-sider-zindex;
  min-height: 100vh;
  background-color: #211E1E;

  .ant-layout-sider-children {
    overflow: hidden;
    &:hover {
      overflow-y: auto;
    }
  }

  &.ant-fixed-sidemenu {
    position: fixed;
    height: 100%;
    background-color: #211E1E;
  }

  .logo {
    position: relative;
    height: 64px;
    padding-left: 24px;
    overflow: hidden;
    line-height: 64px;
    background: #B02D13;
    transition: all .3s;

    img,
    svg,
    h1 {
      display: inline-block;
      vertical-align: middle;
    }

    img,
    svg {
      height: 32px;
      width: 32px;
    }

    h1 {
      color: #fff;
      font-size: 20px;
      margin: 0 0 0 12px;
      font-family: sans-serif;
      font-weight: 600;
      vertical-align: middle;
    }
  }
  .ant-menu-dark {
    // color: rgba(255, 255, 255, 0.65);
    background: #211E1E;

    .ant-menu-submenu-title {
      font-size: 16px;
      .anticon {
        min-width: 14px;
        margin-right: 10px;
        color: #FFFFFF;
        font-size: 16px;
      }
    }
    .ant-menu-item-selected {
      .anticon {
        color: #E02703;
      }
      .anticon + span {
        color: #E02703;
      }
    }
    .ant-menu-submenu-arrow {
      display: none;
    }
    .ant-menu-item {
      font-size:16px;
      // color: rgba(255, 255, 255, 0.65);
      color: #FFFFFF;
      background: #211E1E;
      .anticon {
        font-size: 16px;
      }
    }
    .ant-menu-item-active {
      color: #FFFFFF;
    }
    .ant-menu-sub {
      .ant-menu-item {
        background: #070100;
        color: #FFFFFF;
        font-size: 14px;
        .anticon {
          font-size: 14px;
        }
      }
    }
    .ant-menu-sub {
      background: #070100;
      -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) inset;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) inset;
      font-size: 14px;
    }
    .ant-menu-submenu {
      font-size:14px;
      color: #FFFFFF;
    }
  }

  &.light {
    background-color: #fff;
    box-shadow: 2px 0px 8px 0px rgba(29, 35, 41, 0.05);

    .logo {
      background: #fff;
      box-shadow: 1px 1px 0px 0px #e8e8e8;

      h1 {
        color: unset;
      }
    }

    .ant-menu-light {
      background: #211E1E;
      border-right-color: transparent;
    }
    .ant-layout-sider {
      background: #211E1E;
    }
  }
}

.user-dropdown-menu {
  span {
    user-select: none;
    // right: 16px;
  }
}
.user-dropdown-menu-wrapper.ant-dropdown-menu {
  padding: 4px 0;

  .ant-dropdown-menu-item {
    width: 240px;
  }

  .ant-dropdown-menu-item > .anticon:first-child,
  .ant-dropdown-menu-item > a > .anticon:first-child,
  .ant-dropdown-menu-submenu-title > .anticon:first-child .ant-dropdown-menu-submenu-title > a > .anticon:first-child {
    min-width: 12px;
    margin-right: 8px;
  }
}

// 数据列表 样式
.table-alert {
  margin-bottom: 16px;
}

.table-page-search-wrapper {
  .ant-form-inline {
    .ant-form-item {
      display: flex;
      margin-bottom: 24px;
      margin-right: 0;

      .ant-form-item-control-wrapper {
        flex: 1 1;
        display: inline-block;
        vertical-align: middle;
      }

      > .ant-form-item-label {
        line-height: 32px;
        padding-right: 8px;
        width: auto;
      }
      .ant-form-item-control {
        height: 32px;
        line-height: 32px;
      }
    }
  }

  .table-page-search-submitButtons {
    display: block;
    margin-bottom: 24px;
    white-space: nowrap;
  }
}

.content {
  .table-operator {
    margin-bottom: 18px;

    button {
      margin-right: 8px;
    }
  }
}
// .ant-layout-content {
//   margin: 0px 0 0;
// }
.ant-card-wider-padding {
  .ant-card-body {
    padding: 0;
  }
}
.ant-card-body {
  padding: 0;
}
.ant-tag {
  border-radius: 16px;
  border: 0px solid #d9d9d9;
  background: #EFF0F1;
}
.ant-select-selection--multiple .ant-select-selection__choice {
  border-radius: 16px;
}
.ant-form-item{
  padding-bottom: 0px;
}
.ant-empty-image {
  display: block;
}
.ant-empty-description {
  display: none;
}
.ant-table-placeholder {
  background: #FBFBFB;
  padding: 1px 0;
}
.card-noline .ant-card-head {
  border-bottom: 1px solid #FFFFFF;
}
.ant-layout {
  background: #F7F7F7;
}
// golbal table shadow and border
.ant-card-table-default {
  box-shadow: 0px 4px 10px rgba(221, 224, 228, 0.3), 0px 0px 4px rgba(221, 224, 228, 0.3);
  border-radius: 2px;
  border: 1px #EEEEEE solid;
  .ant-card-head-title {
    margin-left: -8px;
    margin-top: -6px;
  }
  .ant-card-head {
    height: 48px;
  }
  .ant-form-item {
    margin-bottom: 0;
  }
  .ant-form-explain, .ant-form-extra {
    line-height: 1.5;
    margin-bottom: -20px;
  }
  .ant-form-item-control {
    line-height: 0;
  }
}
.ant-card-table-default-noshadow {
  border: 1px #EEEEEE solid;
}
.ant-table-expanded-row .ant-table-default {
  box-shadow: 0px 0px 0px rgba(221, 224, 228, 0.3), 0px 0px 4px rgba(221, 224, 228, 0.3);
  border-radius: 0px;
  border: 0px #EEEEEE solid;
}
.ant-table-expanded-row .ant-table-thead th {
  background-color: #F5F5F5;
}
.ant-table-thead > tr {
  height: 48px;
}
.ant-table-tbody > tr {
  height: 64px;
}
.ant-table {
  line-height: 1;
}
.ant-table-thead > tr > th .ant-table-column-sorter {
  //position: absolute;
  display: inline-block;
  margin-left: 8px;
  margin-top: -3px;
  width: 14px;
  height: 17px;
  top: auto;
  right: auto;
}
.ant-table-thead > tr > th {
  background-color: #FFFFFF;
}
.ant-table-tbody > tr > td {
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ant-select-dropdown-menu {
  padding: 0;
}
.ant-select-dropdown-menu-item {
  line-height: 1;
  padding: 16px 14px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.account-class .ant-select-dropdown-menu-item {
  white-space: inherit;
}
.ant-tag {
  height: 26px;
    border-radius: 16px;
    border: 0px solid #d9d9d9;
    background: #EFF0F1;
    padding: 0 14px;
    padding-top: 3px;
    padding-bottom: 6px;
}
.ant-form-explain {
  text-align: left;
}
.userLayout .ant-message {
  left: 0;
  top: 64px;
}
.ant-message {
  left: 128px;
  top: 64px;
}
.ant-btn-primary {
  text-shadow: none;
  box-shadow: none;
}
.ant-divider, .ant-divider-vertical {
  position: relative;
  top: -0.06em;
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 6px;
  vertical-align: middle;
  // margin-right: 0px;
}
.ant-tabs-nav {
  font-size: 18px;
}
.ant-tabs-bar {
  border-bottom: none;
}
.ant-tabs-ink-bar {
  height: 4px;
}
.ant-tabs-nav .ant-tabs-tab {
  font-weight: 500;
}
.ant-btn-background-ghost {
  color: #1A7DF1;
  background-color: #FFFFFF;
  border-color: #1A7DF1;
  text-shadow: none;
}
.ant-btn-background-ghost {
  background: #FFFFFF !important;
}
.ghost-button-default .ant-btn-background-ghost {
  background-color: transparent !important;
}
.ant-menu-dark, .ant-menu-dark .ant-menu-sub {
  background: #070100
}
.ant-select-selection--multiple .ant-select-selection__choice {
  background-color: #eff0f1;
  border: none;
}
.has-error .ant-form-explain {
  font-size: 12px;
}
.ant-tag {
  cursor: default;
}
.dropdown-class {
  left: 256px !important;
  top: 124px !important;
  max-width: 400px;
  border-radius: 2px;
  width: 288px;
  position: fixed;
}
.um-dropdown-class {
  top: 64px !important;
  left: calc(~"100vw - 280px") !important;
  max-width: 400px;
  border-radius: 2px;
  width: 264px;
  position: fixed;
}
.ant-select-focused {
  border: none !important;
  box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.2) !important;
  color: #070100 !important;
  border-color: #070100 !important;
}
.ant-menu-dark .ant-menu-item > a {
 color: #FFFFFF;
}
.ant-input-number-handler-wrap { // input number
  display: none;
}

.hide-sub {
  .ant-menu-sub {
    display: none;
  }
}
.show-sub {
  .ant-menu-sub {
    display: block;
  }
}
.ant-menu-dark .ant-menu-item-disabled, .ant-menu-dark .ant-menu-submenu-disabled, .ant-menu-dark .ant-menu-item-disabled > a, .ant-menu-dark .ant-menu-submenu-disabled > a {
  color: rgba(255, 255, 255, 0.35) !important;
  opacity: 1;
  cursor: default;
}
.ant-table-pagination.ant-pagination {
  float: right;
  margin: 16px 16px;
}
.row-edit {
  .ant-form-item-control {
    line-height: 0;
  }
}
.ant-calendar-picker-container {
  .ant-tag {
    background: #FFFFFF;
  }
}
.ant-select-dropdown {
  box-shadow: 0px 8px 24px rgba(181, 186, 192, 0.25), 0px 4px 10px rgba(181, 186, 192, 0.3);
  border-radius: 2px;
}
.ant-avatar-sm {
  width: 32px;
  height: 32px;
}
.ant-slider-track {
  background-color: #F87E49;
  z-index: 1;
}
.ant-slider-step {
  background-color: #0FCCAA;
}
.ant-slider-handle {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  background-color: #FFFFFF;
  border: solid 1px #FFFFFF;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15), 0px 1px 4px rgba(0, 0, 0, 0.15);
}
.ant-slider:hover .ant-slider-track {
  background-color:#F87E49
}
.plcament-select .ant-select-selection-selected-value .plc-type {
  display: none
}
.ant-popover-placement-bottomRight .ant-popover-message-title {
  padding-left: 0;
}
.font-roboto {
  font-family: Roboto;
}
.ant-calendar-time-picker-btn {
  display: none;
}
.om-card-style {
  box-shadow: 0px 4px 10px rgba(221, 224, 228, 0.3), 0px 0px 4px rgba(221, 224, 228, 0.3);
  border-radius: 2px;
}
.ant-table-thead > tr > th .ant-table-column-sorter .ant-table-column-sorter-inner-full {
  margin-top:0;
}
.adt-modal .ant-modal-body {
  text-align: center;
  padding-left:32px;
  padding-right:32px;
  padding-top:0;
}
.adt-modal .ant-modal-title {
  text-align: center;
  margin-top: 26px;
  font-size: 28px;
  font-weight: normal;
}
.adt-modal .ant-modal-header {
  border-bottom: none;
}
.adt-modal .ant-modal-footer {
  border-top: none;
}
.text-length {
  color: #bfbfbf;
}
.ant-cascader-menu {
  min-height: 250px;
}
.ant-select-selection--multiple > ul > li {
  line-height: 24px;
}
.ant-tabs { // 解决a-card加阴影下方不显示 ant-tabs默认样式有overflow设置导致
  overflow: unset;
}
.ant-table-footer {
  position: relative;
  padding: 0;
  color: rgba(0, 0, 0, 0.85);
  background: #fafafa;
  border-top: 0px solid #e8e8e8;
  border-radius: 0 0 4px 4px;
}

.adtLoading{
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.8);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  i{
    color: rgb(32, 160, 255);
    font-size: 30px;
  }
}
.ant-table-footer {
  position: relative;
  padding: 0;
  color: rgba(0, 0, 0, 0.85);
  background: #fafafa;
  border-top: 0px solid #e8e8e8;
  border-radius: 0 0 4px 4px;
}
.adt-cell-blue:after {
  content: '';
  position: absolute;
  left: 4px;
  top: auto;
  bottom: -2px;
  right: auto;
  height: 4px;
  width: calc(100% - 8px);
  border-radius: 8px;
  background-color: #1A7DF1;
}
.adt-cell-green:after {
  content: '';
  position: absolute;
  left: 4px;
  top: auto;
  bottom: -2px;
  right: auto;
  height: 4px;
  width: calc(100% - 8px);
  border-radius: 8px;
  background-color: #32B611;
}
.ant-table-footer .ant-table-tbody > tr > td {
  text-align: right;
}
// disable菜单使用正常样式
.ant-menu-dark .ant-menu-item-disabled, .ant-menu-dark .ant-menu-submenu-disabled, .ant-menu-dark .ant-menu-item-disabled > a, .ant-menu-dark .ant-menu-submenu-disabled > a {
  color: rgba(255, 255, 255, 1) !important;
  opacity: 1;
  cursor: default;
}
.ant-carousel .slick-prev {
  left: unset;
}
.ant-drawer-title{
  color: white;
  font-size: 18px;
  //margin-top: 4px;
}
.ant-drawer-content-wrapper .ant-list-pagination {
  text-align: center;
}
.ant-list-item {
  align-items: start;
}
.ant-list-item-meta-description {
  color: #666666;
}
.ant-drawer-body {
  padding: 16px;
}